SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].NcfDeleteCommand
(
	@Original_ID numeric(10, 0),
	@Original_NCF varchar(11),
	@Original_DESCRIPCION varchar(80),
	@Original_TIPO_NCF varchar(2),
	@IsNull_ID_CONDICION Int,
	@Original_ID_CONDICION numeric(10, 0),
	@Original_DESDE numeric(10, 0),
	@Original_HASTA numeric(10, 0),
	@Original_VALUE numeric(10, 0),
	@Original_ACTIVO bigint
)
AS
	SET NOCOUNT OFF;
DELETE FROM [NCF] WHERE (([ID] = @Original_ID) AND ([NCF] = @Original_NCF) AND ([DESCRIPCION] = @Original_DESCRIPCION) AND ([TIPO_NCF] = @Original_TIPO_NCF) AND ((@IsNull_ID_CONDICION = 1 AND [ID_CONDICION] IS NULL) OR ([ID_CONDICION] = @Original_ID_CONDICION)) AND ([DESDE] = @Original_DESDE) AND ([HASTA] = @Original_HASTA) AND ([VALUE] = @Original_VALUE) AND ([ACTIVO] = @Original_ACTIVO))
GO
